package com.example.votingsystem.repository;

import com.example.votingsystem.entity.News;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

public interface NewsRepository extends JpaRepository<News, Long> {
    List<News> findByIsActiveTrueOrderByCreatedAtDesc();
    List<News> findByIsActiveTrueAndCategoryOrderByCreatedAtDesc(String category);
}
